<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        function findByItem(pg) {
            $("pageN0").value = pg;
            $("f1").submit();
        }

        function $(id) {
            return document.getElementById(id);
        }

    </script>

</head>
<body>

<table border="1" width="60%">
    <thead>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>生日</th>
        <th>电话</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="stu:${ipage.records}">
        <td th:text="${stu.id}"></td>
        <td th:text="${stu.name}"></td>
        <td th:text="${stu.birthday}"></td>
        <td th:text="${stu.phone}"></td>
        <td><a th:href="@{/student/findById(id=${stu.id})}">修改</a>
            <a th:href="@{/student/del(id=${stu.id})}">删除</a>
        </td>
    </tr>
    </tbody>
</table>


<div>
    <a th:each="i:${#numbers.sequence(1,ipage.pages)}" th:text="${i}"
       style="margin-left: 10px"
       th:href="'javascript:findByItem('+${i}+')'"></a>

    <a href="/add.html">添加</a>
</div>

<form id="f1" action="/student/findByItem">
    <input type="hidden" name="pageNO" id="pageN0"><br>
    姓名: <input type="text" name="name" th:value="${name}"><br>
    起始日期: <input type="text" name="startDate" th:value="${startDate}"><br>
    结束日期: <input type="text" name="endDate" th:value="${endDate}"><br>
    <input type="submit" value="提 交">
</form>

</body>
</html>



























